<?php
/*

	admin_index
*/

define('IN_ELS', true);
define('ADMIN_IN_ELS', true);
define('ELS_ROOT', substr(__FILE__, 0, -9));
require ELS_ROOT.'lib/Constants.class.php';

//ob_start();
//$lifeTime = 24*3600;//一天  
//session_set_cookie_params( $lifeTime );  
session_start();

// check login
if(empty($_SESSION["admin"])){
	$_REQUEST['p'] = "";
	if($_REQUEST['a'] != "login" && $_REQUEST['a'] != "selectcode"){
		$_REQUEST['a'] = "loginPage";
	}
}

$page 	 = empty($_REQUEST['p']) ? 'admin' : $_REQUEST['p'];
require  ELS_ROOT.'model/'.$page.'_model.php';
require  ELS_ROOT.'control/'.$page.'_control.php';
$control = new control();

?>